package com.dp.appi.service.impl;

import com.dp.appi.dao.ExpPhotoDao;
import com.dp.appi.service.ExpPhotoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * Created by xiaoji on 2016/5/12.
 */
@Service
public class ExpPhotoServiceImpl implements ExpPhotoService {
    @Autowired
    private ExpPhotoDao expPhotoDao;

    /**
     * 查询踏勘照片
     *
     * @param exploration_ids 踏勘id
     * @return
     */
    @Override
    public Map<String, Object> expPhotoList(Long exploration_ids) {
        return expPhotoDao.expPhotoList(exploration_ids);
    }

    /**
     * 保存踏勘照片
     *
     * @param imgUrl         照片路径
     * @param exploration_id 踏勘id
     * @param photo_type     照片类型 一类照片 1、二类照片 2、三类照片 3
     * @param photo_thumb     缩略图
     * @return
     */
    @Override
    public Long saveExpPhoto(String imgUrl, Long exploration_id, Integer photo_type,String photo_thumb) {
        return expPhotoDao.saveExpPhoto(imgUrl,exploration_id,photo_type,photo_thumb);
    }

    /**
     * 删除踏勘照片
     *
     * @param photo_id 照片id
     */
    @Override
    public void delExpPhoto(Long photo_id) {
        expPhotoDao.delExpPhoto(photo_id);
    }
}
